package com.sxkf.template.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 帖子评论
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-08-20 11:48:57
 */
@Data
@TableName("t_post_comment")
@ApiModel(value = "PostComment对象", description = "帖子评论")
public class PostComment implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId("id")
    private String id;

    @ApiModelProperty("帖子id")
    @TableField("post_id")
    private String postId;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty("用户昵称")
    @TableField("user_nick_name")
    private String userNickName;

    @ApiModelProperty("用户头像")
    @TableField("user_avater")
    private String userAvater;

    @ApiModelProperty("评论内容")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "评论父id",notes = "顶级评论为0")
    @TableField("pid")
    private String pid;

    @ApiModelProperty(value = "顶级id",notes = "顶级评论为0")
    @TableField("top_id")
    private String topId;

    @ApiModelProperty(value = "点赞数")
    @TableField("like_count")
    private Integer likeCount;

    @ApiModelProperty("是否删除")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "子评论")
    @TableField(exist = false)
    private List<PostComment> childComment;

    @TableField(exist = false)
    private Long childCount;

    @TableField(exist = false)
    private String note;
}
